<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      //let a = 200
      //a = 300
      //console.log(a)

      //用来声明常量，用const声明之后，不能改变其内容
      //const b = 2000
      //b = 3000 //这里报错
      //const声明的东西，要区分基本类型还是引用类型

      // let o1 = { name: 'abc' }
      const o2 = { name: 'def' }

      o2.name = 'xxx'
      console.log(o2.name)
      //下列代码相当于换了一个引用
      // o2 = {
      //   age: 18,
      // }
    </script>
  </body>
</html>
